package com.xiangxiao.rpan.storage.service;

import com.xiangxiao.rpan.storage.entity.TUploadedRecord;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;

/**
 * @auther xiangxiao
 * @email 573768011@qq.com
 * @data 2023/11/30 16:09
 */
public interface DownloadService {

  /**
  * 下载文件总方法
  * @param request 请求体
   *@param response 响应体
  * */
  void downloadFile(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException;


  /**
   * 下载小文件
   * @param request 请求体
   *@param response 响应体
   * */
  void downloadSmallFile(HttpServletRequest request, HttpServletResponse response, TUploadedRecord record) throws UnsupportedEncodingException;

  /**
   * 分片下载大文件
   * @param request 请求体
   *@param response 响应体
   * */
  void downloadBigfile(HttpServletRequest request, HttpServletResponse response, TUploadedRecord record);

}
